import { Component, useState, xml } from 'owl'
import img from './test.png'

export class Root extends Component {
    static template = xml`
    <div class="demo" t-on-click="update">
      Hello <t t-esc="state.text"/>
      <img t-att-src="state.img" alt=""/>
    </div>`;

    state = useState({ text: 'Owl', img });
    update () {
      this.state.text = this.state.text === 'Owl' ? 'World' : 'Owl'
    }
}
